chore(release): staging to production - 2026.03.16 - #1024
Merged
Conversation
… large syncs
- Replace offset .range() pagination with cursor-based keyset (.gt('id', lastId))
eliminates O(n^2) Supabase scans on large tables
- Move textSplitter.splitDocuments() inside load() per page instead of
splitting the entire 10k doc array after load() — eliminates dual large
arrays in heap simultaneously
- Add textSplitter param to AAIDomainsLoaderParams and AAIDomainsLoader
- Fixes KUMELLO-68: OOM crashes when syncing 10k+ domains on Render Standard (512MB)
Other loaders unaffected — change is isolated to AAIDomains.ts only.
…sert in syncAndRefreshChunks 500 concurrent chunkRepository.save() calls per batch were opening 500 simultaneous DB connections to Supabase, causing connection pool exhaustion and service crashes on large document stores (10k+ chunks). Replace with single chunkRepository.insert(entities) per batch — same pattern already used in _saveChunksToStorage. One SQL INSERT per batch instead of 500 individual transactions. Also adds sanitizeChunkContent() call to strip null bytes, consistent with the _saveChunksToStorage implementation.
… container NODE_OPTIONS was set to --max-old-space-size=8192 (8GB) but the Render Standard plan only provides 512MB RAM. V8 GC wouldn't collect aggressively because it believed it had 8GB of headroom, causing the OS to OOM-kill the process at 512MB with no stack trace. Setting to 384MB (512MB - ~128MB OS/overhead) forces V8 to GC proactively and throw a JS heap error instead of a silent OOM kill.
- while loop now guards on fetchedDomainCount (source docs) not allDocs.length (chunks), so limit=N always means N source domains regardless of whether a textSplitter is active - remainingItems calculation uses fetchedDomainCount, keeping page fetch size correctly calibrated to remaining source documents - lastId cursor advanced only after docs are successfully pushed to allDocs, preventing silent data gaps on transient errors mid-page - remove allDocs.slice(0, this.limit) — no longer correct when chunks > domains - note insert() lifecycle-hook bypass at both call sites in documentstore service
fix(AAIDomains): keyset pagination + per-page splitting to fix OOM crashes (KUMELLO-68)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
maxtechera
temporarily deployed
to
staging - aai-unified2-flowise-moonstruck
March 16, 2026 21:05 — with
Render
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Release: Staging to Production
Release Date: 2026-03-16
Changes in this release
This PR is automatically created/updated when commits are pushed to staging.
Merging this PR will trigger the release workflow to create a new GitHub release.